package com.blkan.calculator.history;

import java.util.ArrayList;
import java.util.List;

public class HistoryRepository {

    private static HistoryRepository repository;

    private final List<HistoryItem> historyItems;

    private HistoryRepository()
    {
        historyItems = new ArrayList<>();
    }


    public static HistoryRepository getInstance()
    {
        if(repository == null)
            repository = new HistoryRepository();
        return repository;

    }

    public List<HistoryItem> getHistoryItems() {
        return historyItems;
    }
}
